package com.bjtu.laorenyouhao.guanliyuan.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.bjtu.common.valid.group.AddGroupp;
import com.bjtu.common.valid.group.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 地点表
 * 
 * @author yangyalong
 * @email yangyalong@gmail.com
 * @date 2021-07-08 21:01:02
 */
@Data
@TableName("gly_room")
public class RoomEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	@NotNull(message = "修改时必须指定房间id",groups = {UpdateGroup.class})
	@Null(message = "新增不能指定房间id",groups = {AddGroupp.class})
	private Long id;
	/**
	 * 地点名字
	 */
	@NotBlank(message = "房间名不能为空", groups = {AddGroupp.class,UpdateGroup.class})
	private String name;
	/**
	 * 摄像头访问路径
	 */
	@NotBlank(groups = {AddGroupp.class})
	@URL(message = "请输入合法的URL地址",groups = {AddGroupp.class,UpdateGroup.class})
	private String sxtPath;
	/**
	 * 开始使用时间
	 */
	@NotNull(groups = {AddGroupp.class})
	private Date beginDate;

}
